Site Export is a pain. Don't use it. Use Epub instead.
The SiteExport Plugin is used to export the User Manual (compressed siteexport.zip with multiple page html & images). The Opencpn_User_Manual TOC page:
See opencpn:opencpn_user_manal:toc
is used to provide a “hyperlinked page-by-page” Table of Contents which is required to export the User Manual.
There is more information about configuration of the IndexMenu Plugin & TOC here, but the syntax and code we need in the TOC page to create the Flat open TOC is:
CODE: {{indexmenu>:opencpn:opencpn_user_manual#5|msort nsort nojs skipns=/(opencpn:opencpn_user_manual:gallery_boats|opencpn:opencpn_user_manual:edit_user_manual|opencpn:opencpn_user_manual:toc|)/}}
Skip Namespaces parameter skipns=(ns|sn|ns)
See TOC User Manual for the result.
To see this code, navigate to the OpenCPN Embedded User Manual TOC page above and use DWedit (right hand menu second button from the bottom to expose the code, you need edit rights).
Except levels and Exclusion.
Information about “do” Level:action_modes
different views…depends on render engine.
export_raw: Export as wiki markup export_xhtml: Export as XHTML export_xhtmlbody: Export XHTML-body only check: Dumps some information about the users permissions and the DokuWiki setup.
Extension Table - Render Engines
DokuWiki Export
Configuration Please be sure the export action is not disabled.
You can specify the do parameter as an HTTP header called X-DOKUWIKI-DO, too. This may be useful for creating a static dump with a website spider.
Example: wget -E -r http://wiki.foo.tld/doku.php?id=start -l 0 --header="X-DokuWiki-Do: export_xhtml"
These are the settings which should be used in the Admin > Config down to SiteExport
| Parameter Description | Value |
|---|---|
| plugin export allowallusers | Checked |
| plugin siteexport default depth | 7 |
| plugin siteexport zipfilename | opencpn:siteexport.zip |
| plugin siteexport exclude | pdf zip 7z edit_user_manual blank cruisersforum gallery_boats place_view github |
| plugin siteexport max_execution_time | 2400 |
| plugin siteexport ignoreNon200 | checked |
| plugin siteexport ignoreAJAXError | checked |
| plugin siteexport debugLevel | Error |
| plugin siteexport debugFile | debug3.txt |
| plugin siteexport cachetime | 60*60*24 |
| plugin siteexport PDFHeaderPagebreak | 1 |
| plugin siteexport seOddEven | not checked |
| plugin siteexport defaultAuthenticationUser | admin |
| plugin siteexport defaultAuthenticationPassword | blank |
| plugin siteexport useProxy | blank |
| plugin siteexport offSiteLinkTemplate |
To Export OpenCPN User Manual TOC we want a non-expandable flat TOC with every page shown in proper order.
{{indexmenu>:opencpn:opencpn_user_manual#5|msort nsort nojs}}
Top Button - https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn&addParams=1&defaultLang=en&depth=4&depthType=0.0&do=siteexport&ens=opencpn&exportLinkedPages=1&renderer=&template=bootstrap3
Middle Button - wget --max-redirect=4 --output-document=siteexport.zip --post-data="id=opencpn&addParams=1&defaultLang=en&depth=4&depthType=0.0&do=siteexport&ens=opencpn&exportLinkedPages=1&renderer=&template=bootstrap3" https://opencpn.org/wiki/dokuwiki/doku.php?id=doku.php --http-user=USER --http-passwd=PASSWD
Bottom Button - curl -L --max-redirs 4 -o siteexport.zip -d "id=opencpn&addParams=1&defaultLang=en&depth=4&depthType=0.0&do=siteexport&ens=opencpn&exportLinkedPages=1&renderer=&template=bootstrap3" https://opencpn.org/wiki/dokuwiki/doku.php?id=doku.php --anyauth --user USER:PASSWD
Then hit SAVE
Debugging must be activated from ADMIN > CONFIG and Browser file>“find” “siteexp” go down and change these parameters:
plugin»siteexport»debugFile
Debug File debug3.txt
plugin»siteexport»zipfilename
Wiki Path and name for exported ZIP file opencpn:siteexport.zip
plugin»siteexport»exclude
Pattern to exclude resources .gov|favicon|advanced_chart_work|gshhshires
One problem to detect the error was that someone used the '@' symbol in
fetch.php
to supress error message of
file_get_contents()
So, no log entry was generated in the php_errors.log file.
IMHO: it would be better not to use the @ symbol, so debugging is more easy.
Then click on the Home button, from the dropdown button pick Media Manager
https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn&do=media&ns=
and look under the directories for root then look for the debug.txt file or in our case debug3.txt. You can click on it to get it into the window, then click on the file name to download it. View it with something like NotePad++. The last error will be at the end.
Each time SiteExport is used it leaves a file here, browse to root:opencpn directory. Use Media Manager to see
https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn&do=media&ns=debug3.txt
https://github.com/i-net-software/dokuwiki-plugin-siteexport/issues/64
You could use a “toc” - page in the namespace. see https://github.com/i-net-software/dokuwiki-plugin-siteexport#table-of-contents-definition - With
But you'd have to define the structure and every page by hand.
Ok, how do I eliminate the wiki shell and extra navigation menu? Would that be resolved by a line by line “toc” of every page? –This is a lot of work to make and maintain. I wonder if there is a script that could take the outline that we have for
{{indexmenu>:opencpn:opencpn_user_manual#1|js#drktheme navbar msort nsort}}
and just turn it into a line by line TOC? @gamma
The look of your exported pages depends on your template. You will have to modify it or use a template that suits your needs. As for the TOC File: yeah, that would be nice. Not sure if “siteexportAGGREGATOR” (see documenation) could help here …
Thanks, Ok,
To eliminate the Wiki Shell and doubled left navigation : We would need to make a modified template and reference that template.
How to turn the %% {{indexmenu ...}}%% navigation and sorting into a line by line TOC Ok I'll look at siteexportAggregator.
PS: I tried checking “Body only” in the Export Page configuration. I think that did the reverse of what I wanted, it kept the wiki shell. I want the Wiki Documentation only with navigation, I think.
https://github.com/i-net-software/dokuwiki-plugin-siteexport/issues/73#event-987171098
After Export the siteexport.zip contains:
..\lib\exe\css.php.t.bootstrap3.css
..\lib\exe\js.php.bootstrap3.js
..\lib\exe\opensearch.html
What do these files do? Why are they exported? Is the css used by the exported html files? How do we exclude these files? I don't believe the plugin has access to these files.
These are “standard” files, linked in the meta header section. You can either modify the template to exclude them or you can use the global exclude option in the admin settings of the plugin.
https://github.com/i-net-software/dokuwiki-plugin-siteexport/issues/74#event-987173913
https://github.com/i-net-software/dokuwiki-plugin-siteexport/issues/76#issuecomment-284311566 Exclude wildcard for all “blank” or “whatever…labeled” pages Then a checkbox to exclude all empty directories, run after the “blank” pages are filtered
try the global exclude option?